3.59 \(\int x^2 (a+b \tanh ^{-1}(c x^2)) \, dx\)

Optimal. Leaf size=63 \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac{b \tan ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}-\frac{b \tanh ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}+\frac{2 b x}{3 c} \]

[Out]

(2*b*x)/(3*c) - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) - (b*ArcTanh[Sqrt[c]*x])/(3*c^(3/2)) + (x^3*(a + b*ArcTanh[c
*x^2]))/3

________________________________________________________________________________________

Rubi [A]  time = 0.0330533, antiderivative size = 63, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357, Rules used = {6097, 321, 212, 206, 203} \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac{b \tan ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}-\frac{b \tanh ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}+\frac{2 b x}{3 c} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) - (b*ArcTanh[Sqrt[c]*x])/(3*c^(3/2)) + (x^3*(a + b*ArcTanh[c
*x^2]))/3

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 212

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b), 2]
]}, Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&
 !GtQ[a/b, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x^2 \left (a+b \tanh ^{-1}\left (c x^2\right )\right ) \, dx &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac{1}{3} (2 b c) \int \frac{x^4}{1-c^2 x^4} \, dx\\ &=\frac{2 b x}{3 c}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac{(2 b) \int \frac{1}{1-c^2 x^4} \, dx}{3 c}\\ &=\frac{2 b x}{3 c}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )-\frac{b \int \frac{1}{1-c x^2} \, dx}{3 c}-\frac{b \int \frac{1}{1+c x^2} \, dx}{3 c}\\ &=\frac{2 b x}{3 c}-\frac{b \tan ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}-\frac{b \tanh ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (c x^2\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.0188546, size = 91, normalized size = 1.44 \[ \frac{a x^3}{3}+\frac{b \log \left (1-\sqrt{c} x\right )}{6 c^{3/2}}-\frac{b \log \left (\sqrt{c} x+1\right )}{6 c^{3/2}}-\frac{b \tan ^{-1}\left (\sqrt{c} x\right )}{3 c^{3/2}}+\frac{1}{3} b x^3 \tanh ^{-1}\left (c x^2\right )+\frac{2 b x}{3 c} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c*x^2]),x]

[Out]

(2*b*x)/(3*c) + (a*x^3)/3 - (b*ArcTan[Sqrt[c]*x])/(3*c^(3/2)) + (b*x^3*ArcTanh[c*x^2])/3 + (b*Log[1 - Sqrt[c]*
x])/(6*c^(3/2)) - (b*Log[1 + Sqrt[c]*x])/(6*c^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 51, normalized size = 0.8 \begin{align*}{\frac{{x}^{3}a}{3}}+{\frac{{x}^{3}b{\it Artanh} \left ( c{x}^{2} \right ) }{3}}+{\frac{2\,bx}{3\,c}}-{\frac{b}{3}\arctan \left ( x\sqrt{c} \right ){c}^{-{\frac{3}{2}}}}-{\frac{b}{3}{\it Artanh} \left ( x\sqrt{c} \right ){c}^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c*x^2)),x)

[Out]

1/3*x^3*a+1/3*x^3*b*arctanh(c*x^2)+2/3*b*x/c-1/3*b*arctan(x*c^(1/2))/c^(3/2)-1/3*b*arctanh(x*c^(1/2))/c^(3/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.22894, size = 448, normalized size = 7.11 \begin{align*} \left [\frac{b c^{2} x^{3} \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x - 2 \, b \sqrt{c} \arctan \left (\sqrt{c} x\right ) + b \sqrt{c} \log \left (\frac{c x^{2} - 2 \, \sqrt{c} x + 1}{c x^{2} - 1}\right )}{6 \, c^{2}}, \frac{b c^{2} x^{3} \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right ) + 2 \, a c^{2} x^{3} + 4 \, b c x + 2 \, b \sqrt{-c} \arctan \left (\sqrt{-c} x\right ) - b \sqrt{-c} \log \left (\frac{c x^{2} + 2 \, \sqrt{-c} x - 1}{c x^{2} + 1}\right )}{6 \, c^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="fricas")

[Out]

[1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^3 + 4*b*c*x - 2*b*sqrt(c)*arctan(sqrt(c)*x) + b*sqrt
(c)*log((c*x^2 - 2*sqrt(c)*x + 1)/(c*x^2 - 1)))/c^2, 1/6*(b*c^2*x^3*log(-(c*x^2 + 1)/(c*x^2 - 1)) + 2*a*c^2*x^
3 + 4*b*c*x + 2*b*sqrt(-c)*arctan(sqrt(-c)*x) - b*sqrt(-c)*log((c*x^2 + 2*sqrt(-c)*x - 1)/(c*x^2 + 1)))/c^2]

________________________________________________________________________________________

Sympy [A]  time = 12.9636, size = 581, normalized size = 9.22 \begin{align*} \begin{cases} - \frac{4 a c^{2} x^{3} \sqrt{\frac{1}{c}}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{4 i a c^{2} x^{3} \sqrt{\frac{1}{c}}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{4 b c^{2} x^{3} \sqrt{\frac{1}{c}} \operatorname{atanh}{\left (c x^{2} \right )}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{4 i b c^{2} x^{3} \sqrt{\frac{1}{c}} \operatorname{atanh}{\left (c x^{2} \right )}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{2 i b c^{2} \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- 12 c^{4} \sqrt{\frac{1}{c}} - 12 i c^{4} \sqrt{\frac{1}{c}}} - \frac{8 b c x \sqrt{\frac{1}{c}}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{8 i b c x \sqrt{\frac{1}{c}}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} + \frac{6 i b c \log{\left (x + i \sqrt{\frac{1}{c}} \right )}}{- 12 c^{3} \sqrt{\frac{1}{c}} - 12 i c^{3} \sqrt{\frac{1}{c}}} - \frac{4 i b c \log{\left (x - \sqrt{\frac{1}{c}} \right )}}{- 12 c^{3} \sqrt{\frac{1}{c}} - 12 i c^{3} \sqrt{\frac{1}{c}}} - \frac{4 i b c \operatorname{atanh}{\left (c x^{2} \right )}}{- 12 c^{3} \sqrt{\frac{1}{c}} - 12 i c^{3} \sqrt{\frac{1}{c}}} + \frac{4 b \log{\left (x - i \sqrt{\frac{1}{c}} \right )}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{4 b \log{\left (x - \sqrt{\frac{1}{c}} \right )}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} - \frac{4 b \operatorname{atanh}{\left (c x^{2} \right )}}{- 12 c^{2} \sqrt{\frac{1}{c}} - 12 i c^{2} \sqrt{\frac{1}{c}}} & \text{for}\: c \neq 0 \\\frac{a x^{3}}{3} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c*x**2)),x)

[Out]

Piecewise((-4*a*c**2*x**3*sqrt(1/c)/(-12*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) - 4*I*a*c**2*x**3*sqrt(1/c)/(-1
2*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) - 4*b*c**2*x**3*sqrt(1/c)*atanh(c*x**2)/(-12*c**2*sqrt(1/c) - 12*I*c**
2*sqrt(1/c)) - 4*I*b*c**2*x**3*sqrt(1/c)*atanh(c*x**2)/(-12*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) - 2*I*b*c**2
*log(x + I*sqrt(1/c))/(-12*c**4*sqrt(1/c) - 12*I*c**4*sqrt(1/c)) - 8*b*c*x*sqrt(1/c)/(-12*c**2*sqrt(1/c) - 12*
I*c**2*sqrt(1/c)) - 8*I*b*c*x*sqrt(1/c)/(-12*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) + 6*I*b*c*log(x + I*sqrt(1/
c))/(-12*c**3*sqrt(1/c) - 12*I*c**3*sqrt(1/c)) - 4*I*b*c*log(x - sqrt(1/c))/(-12*c**3*sqrt(1/c) - 12*I*c**3*sq
rt(1/c)) - 4*I*b*c*atanh(c*x**2)/(-12*c**3*sqrt(1/c) - 12*I*c**3*sqrt(1/c)) + 4*b*log(x - I*sqrt(1/c))/(-12*c*
*2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) - 4*b*log(x - sqrt(1/c))/(-12*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)) - 4*b*
atanh(c*x**2)/(-12*c**2*sqrt(1/c) - 12*I*c**2*sqrt(1/c)), Ne(c, 0)), (a*x**3/3, True))

________________________________________________________________________________________

Giac [A]  time = 1.27659, size = 101, normalized size = 1.6 \begin{align*} -\frac{1}{3} \, b c^{5}{\left (\frac{\arctan \left (\sqrt{c} x\right )}{c^{\frac{13}{2}}} - \frac{\arctan \left (\frac{c x}{\sqrt{-c}}\right )}{\sqrt{-c} c^{6}}\right )} + \frac{1}{6} \, b x^{3} \log \left (-\frac{c x^{2} + 1}{c x^{2} - 1}\right ) + \frac{1}{3} \, a x^{3} + \frac{2 \, b x}{3 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c*x^2)),x, algorithm="giac")

[Out]

-1/3*b*c^5*(arctan(sqrt(c)*x)/c^(13/2) - arctan(c*x/sqrt(-c))/(sqrt(-c)*c^6)) + 1/6*b*x^3*log(-(c*x^2 + 1)/(c*
x^2 - 1)) + 1/3*a*x^3 + 2/3*b*x/c